﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once

#include "GcmpGeometryInterface.h"

namespace gcmp
{

    class Coordinate3d;
    class IGraphicsBRepBody;
    class IGraphicsCurve3d;
    class ICurve3d;
    

    /// \brief 消隐
    ///
    class IHiddenLineRemoval
    {
    public:
        virtual ~IHiddenLineRemoval() {}

        /// \brief 计算消隐后的可见线
        ///
        /// \param coordinate3d 观察坐标系(沿Z轴负向看)
        /// \param graphicsBRepBodies 传入的IGraphicsBRepBody
        /// \param visibleOpCurves 输出消隐后的可见线
        /// \return 成功返回true,否则返回false
        virtual bool CalculateVisibleLines(const gcmp::Coordinate3d& coordinate3d, const std::vector<const IGraphicsBRepBody*>& graphicsBRepBodies, std::vector<OwnerPtr<ICurve3d>>& visibleOpCurves) const = 0;

        /// \brief 计算消隐后的不可见线
        ///
        /// \param coordinate3d 观察坐标系(沿Z轴负向看)
        /// \param graphicsBRepBodies 传入的IGraphicsBRepBody
        /// \param hiddenOpCurves 输出消隐后的不可见线
        /// \return 成功返回true,否则返回false
        virtual bool CalculateHiddenLines(const gcmp::Coordinate3d& coordinate3d, const std::vector<const IGraphicsBRepBody*>& graphicsBRepBodies, std::vector<OwnerPtr<ICurve3d>>& hiddenOpCurves) const = 0;
    };
}